home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / TimeZone.java < prev    next >
Text File  |  1998-09-22  |  85KB  |  1,314 lines

  1. /*
  2.  * @(#)TimeZone.java    1.26 98/02/12
  3.  *
  4.  * (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  5.  * (C) Copyright IBM Corp. 1996 - All Rights Reserved
  6.  *
  7.  * Portions copyright (c) 1996 Sun Microsystems, Inc. All Rights Reserved.
  8.  *
  9.  *   The original version of this source code and documentation is copyrighted
  10.  * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
  11.  * materials are provided under terms of a License Agreement between Taligent
  12.  * and Sun. This technology is protected by multiple US and International
  13.  * patents. This notice and attribution to Taligent may not be removed.
  14.  *   Taligent is a registered trademark of Taligent, Inc.
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software
  17.  * and its documentation for NON-COMMERCIAL purposes and without
  18.  * fee is hereby granted provided that this copyright notice
  19.  * appears in all copies. Please refer to the file "copyright.html"
  20.  * for further important copyright and licensing information.
  21.  *
  22.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  23.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  24.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  25.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  26.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  27.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  28.  *
  29.  */
  30.  
  31. package java.util;
  32. import java.io.Serializable;
  33.  
  34. /**
  35.  * <code>TimeZone</code> represents a time zone offset, and also figures out daylight
  36.  * savings.
  37.  *
  38.  * <p>
  39.  * Typically, you get a <code>TimeZone</code> using <code>getDefault</code>
  40.  * which creates a <code>TimeZone</code> based on the time zone where the program
  41.  * is running. For example, for a program running in Japan, <code>getDefault</code>
  42.  * creates a <code>TimeZone</code> object based on Japanese Standard Time.
  43.  *
  44.  * <p>
  45.  * You can also get a <code>TimeZone</code> using <code>getTimeZone</code> along
  46.  * with a time zone ID. For instance, the time zone ID for the Pacific
  47.  * Standard Time zone is "PST". So, you can get a PST <code>TimeZone</code> object
  48.  * with:
  49.  * <blockquote>
  50.  * <pre>
  51.  * TimeZone tz = TimeZone.getTimeZone("PST");
  52.  * </pre>
  53.  * </blockquote>
  54.  * You can use <code>getAvailableIDs</code> method to iterate through
  55.  * all the supported time zone IDs. You can then choose a
  56.  * supported ID to get a favorite <code>TimeZone</code>.
  57.  *
  58.  * @see          Calendar
  59.  * @see          GregorianCalendar
  60.  * @see          SimpleTimeZone
  61.  * @version      1.26 02/12/98
  62.  * @author       Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu
  63.  */
  64. abstract public class TimeZone implements Serializable, Cloneable {
  65.  
  66.     /**
  67.      * Gets the time zone offset, for current date, modified in case of
  68.      * daylight savings. This is the offset to add *to* UTC to get local time.
  69.      * @param era the era of the given date.
  70.      * @param year the year in the given date.
  71.      * @param month the month in the given date.
  72.      * Month is 0-based. e.g., 0 for January.
  73.      * @param day the day-in-month of the given date.
  74.      * @param dayOfWeek the day-of-week of the given date.
  75.      * @param milliseconds the millis in day in <em>standard</em> local time.
  76.      * @return the offset to add *to* GMT to get local time.
  77.      */
  78.     abstract public int getOffset(int era, int year, int month, int day,
  79.                                   int dayOfWeek, int milliseconds);
  80.  
  81.     /**
  82.      * Sets the base time zone offset to GMT.
  83.      * This is the offset to add *to* UTC to get local time.
  84.      * @param offsetMillis the given base time zone offset to GMT.
  85.      */
  86.     abstract public void setRawOffset(int offsetMillis);
  87.  
  88.     /**
  89.      * Gets unmodified offset, NOT modified in case of daylight savings.
  90.      * This is the offset to add *to* UTC to get local time.
  91.      * @return the unmodified offset to add *to* UTC to get local time.
  92.      */
  93.     abstract public int getRawOffset();
  94.  
  95.     /**
  96.      * Gets the ID of this time zone.
  97.      * @return the ID of this time zone.
  98.      */
  99.     public String getID()
  100.     {
  101.         return ID;
  102.     }
  103.  
  104.     /**
  105.      * Sets the time zone ID. This does not change any other data in
  106.      * the time zone object.
  107.      * @param ID the new time zone ID.
  108.      */
  109.     public void setID(String ID)
  110.     {
  111.         this.ID = ID;
  112.     }
  113.  
  114.     /**
  115.      * Queries if this time zone uses Daylight Savings Time.
  116.      * @return true if this time zone uses Daylight Savings Time,
  117.      * false, otherwise.
  118.      */
  119.     abstract public boolean useDaylightTime();
  120.  
  121.     /**
  122.      * Queries if the given date is in Daylight Savings Time in
  123.      * this time zone.
  124.      * @param date the given Date.
  125.      * @return true if the given date is in Daylight Savings Time,
  126.      * false, otherwise.
  127.      */
  128.     abstract public boolean inDaylightTime(Date date);
  129.  
  130.     /**
  131.      * Gets the TimeZone for the given ID.
  132.      * @param ID the given ID.
  133.      * @return a TimeZone, or null if the given ID is not recognized.
  134.      */
  135.     public static synchronized TimeZone getTimeZone(String ID)
  136.     {
  137.         // Don't allow long IDs yet
  138.         TimeZone zone = (ID.length() <= 3) ? TimeZoneData.get(ID) : null;
  139.         return zone != null ? zone : TimeZoneData.get(DEFAULT_SHORT_ID);
  140.     }
  141.  
  142.     /**
  143.      * Gets the available IDs according to the given time zone offset.
  144.      * @param rawOffset the given time zone GMT offset.
  145.      * @return an array of IDs, where the time zone for that ID has
  146.      * the specified GMT offset. For example, "America/Phoenix" and "America/Denver"
  147.      * both have GMT-07:00, but differ in daylight savings behavior.
  148.      */
  149.     public static synchronized String[] getAvailableIDs(int rawOffset) {
  150.         String[]    resultArray = new String[TimeZoneData.MAXIMUM_ZONES_PER_OFFSET];
  151.         int         count = 0;
  152.         for (int i = 0; i < TimeZoneData.zones.length; ++i) {
  153.             if (rawOffset == TimeZoneData.zones[i].getRawOffset() &&
  154.                 TimeZoneData.zones[i].getID().length() <= 3) // Hide long IDs
  155.                 resultArray[count++] = TimeZoneData.zones[i].getID();
  156.         }
  157.  
  158.         // copy into array of the right size and return
  159.         String[] finalResult = new String[count];
  160.         System.arraycopy(resultArray, 0, finalResult, 0, count);
  161.  
  162.         return finalResult;
  163.     }
  164.  
  165.     /**
  166.      * Gets all the available IDs supported.
  167.      * @return an array of IDs.
  168.      */
  169.     public static synchronized String[] getAvailableIDs() {
  170.         String[]    resultArray = new String[TimeZoneData.zones.length];
  171.         int         count = 0;
  172.         for (int i = 0; i < TimeZoneData.zones.length; ++i)
  173.             if (TimeZoneData.zones[i].getID().length() <= 3) // Hide long IDs
  174.                 resultArray[count++] = TimeZoneData.zones[i].getID();
  175.  
  176.         // copy into array of the right size and return
  177.         String[] finalResult = new String[count];
  178.         System.arraycopy(resultArray, 0, finalResult, 0, count);
  179.  
  180.         return finalResult;
  181.     }
  182.     
  183.     /**
  184.      * Gets the default TimeZone for this host.
  185.      * @return a default TimeZone.
  186.      */
  187.     public static synchronized TimeZone getDefault() {
  188.         if (defaultZone == null) {
  189.             // get the ID from the system properties, and translate the
  190.             // 3-letter code to a full TimeZone id.
  191.             String ID = System.getProperty("user.timezone", DEFAULT_SHORT_ID);
  192.             String remappedID = (String)idlookup.get(ID);
  193.             if (remappedID != null) ID = remappedID;
  194.             // The ID will only be null at this point if the user has set
  195.             // user.timezone to an invalid value.
  196.             if (ID == null) ID = DEFAULT_ID;
  197.             ID = TimeZoneData.mapLongIDtoShortID(ID); // For compatibility with 1.1 FCS
  198.             defaultZone = getTimeZone(ID);
  199.         }
  200.         return (TimeZone)defaultZone.clone();
  201.     }
  202.  
  203.     /**
  204.      * Sets time zone to using the given TimeZone.
  205.      * @param zone the given time zone.
  206.      */
  207.     public static synchronized void setDefault(TimeZone zone)
  208.     {
  209.         defaultZone = zone;
  210.     }
  211.  
  212.     /**
  213.      * Overrides Cloneable
  214.      */
  215.     public Object clone()
  216.     {
  217.         try {
  218.             TimeZone other = (TimeZone) super.clone();
  219.             other.ID = ID;
  220.             return other;
  221.         } catch (CloneNotSupportedException e) {
  222.             throw new InternalError();
  223.         }
  224.     }
  225.  
  226.     // =======================privates===============================
  227.  
  228.     private String           ID;
  229.     private static TimeZone  defaultZone = null;
  230.  
  231.     // These are the default IDs for timezones; we use these if we can't get
  232.     // the host timezone data, or if we don't recognize it.
  233.     private static final String DEFAULT_SHORT_ID = "GMT";
  234.     private static final String DEFAULT_ID       = "Africa/Casablanca";
  235.  
  236.     /**
  237.      * This array maps from the user.timezone 3-letter ID to a usable
  238.      * TimeZone ID.
  239.      */
  240.     private static final String[] idMap =
  241.     {
  242.         // Windows name               user.timezone ID   TimeZone ID
  243.         // ------------               ----------------   -----------
  244.         /* "GMT Standard Time",              */  "GMT",  "Africa/Casablanca",
  245.         /* "Romance Standard Time",          */  "ECT",  "Europe/Paris",
  246.         /* "Egypt Standard Time",            */  "EET",  "Africa/Cairo",
  247.         /* "Saudi Arabia Standard Time",     */  "EAT",  "Asia/Riyadh",
  248.         /* "Iran Standard Time",             */  "MET",  "Asia/Tehran",
  249.         /* "Arabian Standard Time",          */  "NET",  "Asia/Yerevan",
  250.         /* "West Asia Standard Time",        */  "PLT",  "Asia/Karachi",
  251.         /* "India Standard Time",            */  "IST",  "Asia/Calcutta",
  252.         /* "Central Asia Standard Time",     */  "BST",  "Asia/Dacca",
  253.         /* "Bangkok Standard Time",          */  "VST",  "Asia/Bangkok",
  254.         /* "China Standard Time",            */  "CTT",  "Asia/Shanghai",
  255.         /* "Tokyo Standard Time",            */  "JST",  "Asia/Tokyo",
  256.         /* "Cen. Australia Standard Time",   */  "ACT",  "Australia/Adelaide",
  257.         /* "Sydney Standard Time",           */  "AET",  "Australia/Sydney",
  258.         /* "Central Pacific Standard Time",  */  "SST",  "Pacific/Guadalcanal",
  259.         /* "New Zealand Standard Time",      */  "NST",  "Pacific/Auckland",
  260.         /* "Samoa Standard Time",            */  "MIT",  "Pacific/Apia",
  261.         /* "Hawaiian Standard Time",         */  "HST",  "Pacific/Honolulu",
  262.         /* "Alaskan Standard Time",          */  "AST",  "America/Anchorage",
  263.         /* "Pacific Standard Time",          */  "PST",  "America/Los_Angeles",
  264.         /* "US Mountain Standard Time",      */  "MST",  "America/Denver",
  265.         /* "Central Standard Time",          */  "CST",  "America/Chicago",
  266.         /* "Eastern Standard Time",          */  "EST",  "America/New_York",
  267.         /* "Atlantic Standard Time",         */  "PRT",  "America/Halifax",
  268.         /* "Newfoundland Standard Time",     */  "CNT",  "America/St_Johns",
  269.         /* "SA Eastern Standard Time",       */  "AGT",  "America/Buenos_Aires",
  270.         /* "E. South America Standard Time", */  "BET",  "America/Sao_Paulo",
  271.         /* "Azores Standard Time",           */  "CAT",  "Atlantic/Azores",
  272.     };
  273.  
  274.     private static Hashtable idlookup = new Hashtable(idMap.length / 2);
  275.  
  276.     static {
  277.         for (int i=0; i<idMap.length; i+=2)
  278.         {
  279.             if (false)
  280.             {
  281.                 // Debugging code
  282.                 if (TimeZoneData.get(idMap[i+1]) == null)
  283.                     System.out.println("*** Bad TimeZone.idMap at " + i);
  284.                 if (idlookup.get(idMap[i]) != null)
  285.                     System.out.println("*** Duplicate idMap " + idMap[i]);
  286.             }
  287.             idlookup.put(idMap[i], idMap[i+1]);
  288.         }
  289.     }
  290.  
  291.     // Internal Implementation Notes [LIU]
  292.     //
  293.     // TimeZone data is stored in two parts.  The first is an encoding of the
  294.     // rules for each TimeZone.  A TimeZone rule includes the offset of a zone
  295.     // in milliseconds from GMT, the starting month and day for daylight savings
  296.     // time, if there is any, and the ending month and day for daylight savings
  297.     // time.  The starting and ending days are specified in terms of the n-th
  298.     // day of the week, for instance, the first Sunday or the last ("-1"-th)
  299.     // Sunday of the month.  The rules are stored as statically-constructed
  300.     // SimpleTimeZone objects in the TimeZone class.
  301.     //
  302.     // Each rule has a unique internal identifier string which is used to
  303.     // specify it.  This identifier string is arbitrary, and is not to be shown
  304.     // to the user -- it is for programmatic use only.  In order to instantiate
  305.     // a TimeZone object, you pass its identifier string to
  306.     // TimeZone.getTimeZone().  (This identifier is also used to index the
  307.     // localized string data.)
  308.     //
  309.     // The second part of the data consists of localized string names used by
  310.     // DateFormat to describe various TimeZones.  A TimeZone may have up to four
  311.     // names: The abbreviated and long name for standard time in that zone, and
  312.     // the abbreviated and long name for daylight savings time in that zone.
  313.     // The data also includes a representative city.  For example, [ "PST",
  314.     // "Pacific Standard Time", "PDT", "Pacific Daylight Time", "Los Angeles" ]
  315.     // might be one such set of string names in the en_US locale.  These strings
  316.     // are intended to be shown to the user.  The string data is indexed in the
  317.     // system by a pair (String id, Locale locale).  The id is the unique string
  318.     // identifier for the rule for the given TimeZone (as passed to
  319.     // TimeZone.getTimeZone()).  String names are stored as localized resource
  320.     // data of the class java.text.resources.DateFormatZoneData???  where ??? is
  321.     // the Locale specifier (e.g., DateFormatZoneData_en_US).  This data is a
  322.     // two-dimensional array of strings with N rows and 6 columns.  The columns
  323.     // are id, short standard name, long standard name, short daylight name,
  324.     // long daylight name, representative city name.
  325.     //
  326.     // The mapping between rules (SimpleTimeZone objects) and localized string
  327.     // names (DateFormatZoneData objects) is one-to-many.  That is, there will
  328.     // sometimes be more than one localized string name sets associated with
  329.     // each rule.
  330.     //
  331.     // Each locale can potentially have localized name data for all time zones.
  332.     // Since we support approximately 90 time zones and approximately 50
  333.     // locales, there can be over 4500 sets of localized names.  In practice,
  334.     // only a fraction of these names are provided.  If a time zone needs to be
  335.     // displayed to the user in a given locale, and there is no string data in
  336.     // that locale for that time zone, then the default representation will be
  337.     // shown.  This is a string of the form GMT+HHMM or GMT-HHMM, where HHMM
  338.     // represents the offset in hours and minutes with respect to GMT.  This
  339.     // format is used because it is recognized in all locales.  In order to make
  340.     // this mechanism to work, the root resource data (in the class
  341.     // DateFormatZoneData) is left empty.
  342.     //
  343.     // The current default TimeZone is determined via the system property
  344.     // user.timezone.  This is set by the platform-dependent native code to
  345.     // a three-letter abbreviation.  We interpret these into our own internal
  346.     // IDs using a lookup table.
  347. }
  348.  
  349. /**
  350.  * Encapsulates data for international timezones.  This package-private class is for
  351.  * internal use only by TimeZone.  It encapsulates the list of recognized international
  352.  * timezones.  By implementing this as a separate class, the loading and initialization
  353.  * cost for this array is delayed until a TimeZone object is actually created from its ID.
  354.  * This class contains only static variables and static methods; it cannot be instantiated.
  355.  */
  356. class TimeZoneData
  357. {
  358.     // The following value must be set to the maximum number of zones sharing
  359.     // a single base offset value.
  360.     static final int MAXIMUM_ZONES_PER_OFFSET = 13;
  361.  
  362.     static final TimeZone get(String ID)
  363.     {
  364.         Object o = lookup.get(ID);
  365.         return o == null ? null : (TimeZone)((TimeZone)o).clone(); // [sic]
  366.     }
  367.  
  368.     private static final int millisPerHour = 60*60*1000;
  369.  
  370.     static SimpleTimeZone[] zones =
  371.     {
  372.         // The following data is current as of 1997
  373.         //----------------------------------------------------------
  374.         new SimpleTimeZone(-11 * millisPerHour, "Pacific/Apia" /*WST*/),
  375.         // Pacific/Apia W Samoa -11:00  -       WST     # W Samoa Time
  376.         // Pacific/Midway       ?       -11:00  -       SST     # S=Samoa
  377.         // Pacific/Niue Niue    -11:00  -       NUT
  378.         // Pacific/Pago_Pago    American Samoa  -11:00  -       SST     # S=Samoa
  379.         //----------------------------------------------------------
  380.         new SimpleTimeZone(-10 * millisPerHour, "Pacific/Honolulu" /*HST*/),
  381.         // Pacific/Honolulu     Hawaii  -10:00  -       HST
  382.         // Pacific/Fakaofo      Tokelau Is      -10:00  -       TKT     # Tokelau Time
  383.         // Pacific/Johnston     Johnston        -10:00  -       HST
  384.         // Pacific/Tahiti       French Polynesia        -10:00  -       TAHT    # Tahiti Time
  385.         //----------------------------------------------------------
  386. //        new SimpleTimeZone(-10 * millisPerHour, "America/Adak" /*HA%sT*/,
  387. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  388. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  389.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  390.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  391.         // America/Adak Alaska  -10:00  US      HA%sT
  392.         //----------------------------------------------------------
  393. //        new SimpleTimeZone(-10 * millisPerHour, "Pacific/Rarotonga" /*CK%sT*/,
  394. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  395. //                Calendar.MARCH, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, (int)(0.5 * millisPerHour)),
  396.         // Rule Cook    1979    max     -       Mar     Sun>=1  0:00    0       -
  397.         // Rule Cook    1979    max     -       Oct     lastSun 0:00    0:30    HS
  398.         // Pacific/Rarotonga    Cook Is -10:00  Cook    CK%sT
  399.         //----------------------------------------------------------
  400. //        new SimpleTimeZone((int)(-9.5 * millisPerHour), "Pacific/Marquesas" /*MART*/),
  401.         // Pacific/Marquesas    French Polynesia        -9:30   -       MART    # Marquesas Time
  402.         //----------------------------------------------------------
  403. //        new SimpleTimeZone(-9 * millisPerHour, "Pacific/Gambier" /*GAMT*/),
  404.         // Pacific/Gambier      French Polynesia        -9:00   -       GAMT    # Gambier Time
  405.         //----------------------------------------------------------
  406.         new SimpleTimeZone(-9 * millisPerHour, "America/Anchorage" /*AK%sT*/,
  407.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  408.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  409.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  410.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  411.         // America/Anchorage    Alaska  -9:00   US      AK%sT
  412.         // America/Juneau       Alaska  -9:00   US      AK%sT
  413.         // America/Nome Alaska  -9:00   US      AK%sT
  414.         // America/Yakutat      Alaska  -9:00   US      AK%sT
  415.         //----------------------------------------------------------
  416. //        new SimpleTimeZone((int)(-8.5 * millisPerHour), "Pacific/Pitcairn" /*PNT*/),
  417.         // Pacific/Pitcairn     Pitcairn        -8:30   -       PNT     # Pitcairn Time
  418.         //----------------------------------------------------------
  419.         new SimpleTimeZone(-8 * millisPerHour, "America/Los_Angeles" /*P%sT*/,
  420.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  421.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  422.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  423.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  424.         // America/Los_Angeles  US Pacific time, represented by Los Angeles     -8:00   US      P%sT
  425.         // America/Ensenada     Mexico  -8:00   Mexico  P%sT
  426.         // America/Tijuana      Mexico  -8:00   Mexico  P%sT
  427.         // America/Dawson       Northwest Territories, Yukon    -8:00   NT_YK   P%sT
  428.         // America/Whitehorse   Northwest Territories, Yukon    -8:00   NT_YK   P%sT
  429.         // America/Vancouver    British Columbia        -8:00   Vanc    P%sT
  430.         //----------------------------------------------------------
  431.         new SimpleTimeZone(-7 * millisPerHour, "America/Phoenix" /*MST*/),
  432.         // America/Phoenix      ?       -7:00   -       MST
  433.         // America/Dawson_Creek British Columbia        -7:00   -       MST
  434.         //----------------------------------------------------------
  435.         new SimpleTimeZone(-7 * millisPerHour, "America/Denver" /*M%sT*/,
  436.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  437.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  438.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  439.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  440.         // America/Denver       US Mountain time, represented by Denver -7:00   US      M%sT
  441.         // America/Edmonton     Alberta -7:00   Edm     M%sT
  442.         // America/Mazatlan     Mexico  -7:00   Mexico  M%sT
  443.         // America/Inuvik       Northwest Territories, Yukon    -7:00   NT_YK   M%sT
  444.         // America/Yellowknife  Northwest Territories, Yukon    -7:00   NT_YK   M%sT
  445.         // America/Boise        ?       -7:00   US      M%sT
  446.         //----------------------------------------------------------
  447. //        new SimpleTimeZone(-6 * millisPerHour, "America/Costa_Rica" /*C%sT*/),
  448.         // America/Costa_Rica   Costa Rica      -6:00   -       C%sT
  449.         // America/Belize       Belize  -6:00   -       C%sT
  450.         // America/El_Salvador  El Salvador     -6:00   -       C%sT
  451.         // America/Guatemala    Guatemala       -6:00   -       C%sT
  452.         // America/Regina       Saskatchewan    -6:00   -       CST
  453.         // America/Swift_Current        Saskatchewan    -6:00   -       CST
  454.         // America/Tegucigalpa  Honduras        -6:00   -       C%sT
  455.         // Pacific/Galapagos    Ecuador -6:00   -       GALT    # Galapagos Time
  456.         //----------------------------------------------------------
  457.         new SimpleTimeZone(-6 * millisPerHour, "America/Chicago" /*C%sT*/,
  458.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  459.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  460.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  461.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  462.         // America/Chicago      US Central time, represented by Chicago -6:00   US      C%sT
  463.         // America/Rainy_River  Ontario, Quebec -6:00   Canada  C%sT
  464.         // America/Mexico_City  Mexico  -6:00   Mexico  C%sT
  465.         // America/Rankin_Inlet Northwest Territories, Yukon    -6:00   NT_YK   C%sT
  466.         // America/Menominee    Michigan        -6:00   US      C%sT
  467.         // America/Winnipeg     Manitoba        -6:00   Winn    C%sT
  468.         //----------------------------------------------------------
  469. //        new SimpleTimeZone(-6 * millisPerHour, "Pacific/Easter" /*EAS%sT*/,
  470. //                Calendar.OCTOBER, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  471. //                Calendar.MARCH, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  472.         // Rule Chile   1969    max     -       Oct     Sun>=9  0:00    1:00    S
  473.         // Rule Chile   1970    max     -       Mar     Sun>=9  0:00    0       -
  474.         // Pacific/Easter       Chile   -6:00   Chile   EAS%sT
  475.         //----------------------------------------------------------
  476.         new SimpleTimeZone(-5 * millisPerHour, "America/Indianapolis" /*EST*/),
  477.         // America/Indianapolis Indiana -5:00   -       EST
  478.         // America/Bogota       Colombia        -5:00   -       CO%sT   # Colombia Time
  479.         // America/Cayman       Cayman Is       -5:00   -       EST
  480.         // America/Guayaquil    Ecuador -5:00   -       ECT     # Ecuador Time
  481.         // America/Indiana/Knox Indiana -5:00   -       EST
  482.         // America/Indiana/Marengo      Indiana -5:00   -       EST
  483.         // America/Indiana/Vevay        Indiana -5:00   -       EST
  484.         // America/Jamaica      Jamaica -5:00   -       EST
  485.         // America/Lima Peru    -5:00   -       PE%sT   # Peru Time
  486.         // America/Managua      Nicaragua       -5:00   -       EST
  487.         // America/Panama       Panama  -5:00   -       EST
  488.         // America/Porto_Acre   Brazil  -5:00   -       AST
  489.         //----------------------------------------------------------
  490.         new SimpleTimeZone(-5 * millisPerHour, "America/New_York" /*E%sT*/,
  491.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  492.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  493.         // Rule US      1967    max     -       Oct     lastSun 2:00    0       S
  494.         // Rule US      1987    max     -       Apr     Sun>=1  2:00    1:00    D
  495.         // America/New_York     US Eastern time, represented by New York        -5:00   US      E%sT
  496.         // America/Nassau       Bahamas -5:00   Bahamas E%sT
  497.         // America/Nipigon      Ontario, Quebec -5:00   Canada  E%sT
  498.         // America/Thunder_Bay  Ontario, Quebec -5:00   Canada  E%sT
  499.         // America/Montreal     Ontario, Quebec -5:00   Mont    E%sT
  500.         // America/Iqaluit      Northwest Territories, Yukon    -5:00   NT_YK   E%sT
  501.         // America/Detroit      Michigan        -5:00   US      E%sT
  502.         // America/Louisville   ?       -5:00   US      E%sT
  503.         //----------------------------------------------------------
  504. //        new SimpleTimeZone(-5 * millisPerHour, "America/Havana" /*C%sT*/,
  505. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  506. //                Calendar.OCTOBER, 8, -Calendar.SUNDAY /*DOW>=DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  507.         // Rule Cuba    1990    max     -       Apr     Sun>=1  0:00    1:00    D
  508.         // Rule Cuba    1997    max     -       Oct     Sun>=8  0:00s   0       S
  509.         // America/Havana       Cuba    -5:00   Cuba    C%sT
  510.         //----------------------------------------------------------
  511. //        new SimpleTimeZone(-5 * millisPerHour, "America/Port-au-Prince" /*E%sT*/,
  512. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 1 * millisPerHour,
  513. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  514.         // Rule Haiti   1988    max     -       Apr     Sun>=1  1:00s   1:00    D
  515.         // Rule Haiti   1988    max     -       Oct     lastSun 1:00s   0       S
  516.         // America/Port-au-Prince       Haiti   -5:00   Haiti   E%sT
  517.         //----------------------------------------------------------
  518. //        new SimpleTimeZone(-5 * millisPerHour, "America/Grand_Turk" /*E%sT*/,
  519. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  520. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  521.         // Rule TC      1979    max     -       Oct     lastSun 0:00    0       S
  522.         // Rule TC      1987    max     -       Apr     Sun>=1  0:00    1:00    D
  523.         // America/Grand_Turk   Turks and Caicos        -5:00   TC      E%sT
  524.         //----------------------------------------------------------
  525.         new SimpleTimeZone(-4 * millisPerHour, "America/Caracas" /*VET*/),
  526.         // America/Caracas      Venezuela       -4:00   -       VET
  527.         // America/Anguilla     Anguilla        -4:00   -       AST
  528.         // America/Antigua      Antigua and Barbuda     -4:00   -       AST
  529.         // America/Aruba        Aruba   -4:00   -       AST
  530.         // America/Barbados     Barbados        -4:00   -       A%sT
  531.         // America/Curacao      Curacao -4:00   -       AST
  532.         // America/Dominica     Dominica        -4:00   -       AST
  533.         // America/Grenada      Grenada -4:00   -       AST
  534.         // America/Guadeloupe   Guadeloupe      -4:00   -       AST
  535.         // America/Guyana       Guyana  -4:00   -       GYT
  536.         // America/La_Paz       Bolivia -4:00   -       BOT     # Bolivia Time
  537.         // America/Manaus       Brazil  -4:00   -       WST
  538.         // America/Martinique   Martinique      -4:00   -       AST
  539.         // America/Montserrat   Montserrat      -4:00   -       AST
  540.         // America/Port_of_Spain        Trinidad and Tobago     -4:00   -       AST
  541.         // America/Puerto_Rico  Puerto Rico     -4:00   -       AST
  542.         // America/Santo_Domingo        Dominican Republic      -4:00   -       AST
  543.         // America/St_Kitts     St Kitts-Nevis  -4:00   -       AST
  544.         // America/St_Lucia     St Lucia        -4:00   -       AST
  545.         // America/St_Thomas    Virgin Is       -4:00   -       AST
  546.         // America/St_Vincent   St Vincent and the Grenadines   -4:00   -       AST
  547.         // America/Tortola      British Virgin Is       -4:00   -       AST
  548.         //----------------------------------------------------------
  549. //        new SimpleTimeZone(-4 * millisPerHour, "America/Cuiaba" /*W%sT*/,
  550. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  551. //                Calendar.FEBRUARY, 11, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  552.         // Rule Brazil  1996    max     -       Feb     Sun>=11 0:00    0       S
  553.         // Rule Brazil  1996    max     -       Oct     Sun>=1  0:00    1:00    D
  554.         // America/Cuiaba       Brazil  -4:00   Brazil  W%sT
  555.         //----------------------------------------------------------
  556.         new SimpleTimeZone(-4 * millisPerHour, "America/Halifax" /*A%sT*/,
  557.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  558.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  559.         // Rule Halifax 1962    max     -       Oct     lastSun 2:00    0       S
  560.         // Rule Halifax 1987    max     -       Apr     Sun>=1  2:00    1:00    D
  561.         // America/Halifax      ?       -4:00   Halifax A%sT
  562.         // Atlantic/Bermuda     Bermuda -4:00   Bahamas A%sT
  563.         // America/Glace_Bay    ?       -4:00   Halifax A%sT
  564.         // America/Pangnirtung  Northwest Territories, Yukon    -4:00   NT_YK   A%sT
  565.         // America/Goose_Bay    east Labrador   -4:00   StJohns A%sT
  566.         // America/Thule        ?       -4:00   Thule   A%sT
  567.         //----------------------------------------------------------
  568. //        new SimpleTimeZone(-4 * millisPerHour, "America/Santiago" /*CL%sT*/,
  569. //                Calendar.OCTOBER, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  570. //                Calendar.MARCH, 9, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  571.         // Rule Chile   1969    max     -       Oct     Sun>=9  0:00    1:00    S
  572.         // Rule Chile   1970    max     -       Mar     Sun>=9  0:00    0       -
  573.         // America/Santiago     Chile   -4:00   Chile   CL%sT
  574.         // Antarctica/Palmer    USA - year-round bases  -4:00   ChileAQ CL%sT
  575.         //----------------------------------------------------------
  576. //        new SimpleTimeZone(-4 * millisPerHour, "Atlantic/Stanley" /*FK%sT*/,
  577. //                Calendar.SEPTEMBER, 8, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  578. //                Calendar.APRIL, 16, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  579.         // Rule Falk    1986    max     -       Apr     Sun>=16 0:00    0       -
  580.         // Rule Falk    1996    max     -       Sep     Sun>=8  0:00    1:00    S
  581.         // Atlantic/Stanley     Falklands       -4:00   Falk    FK%sT
  582.         //----------------------------------------------------------
  583. //        new SimpleTimeZone(-4 * millisPerHour, "America/Asuncion" /*PY%sT*/,
  584. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 0 * millisPerHour,
  585. //                Calendar.MARCH, 1, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  586.         // Rule Para    1996    max     -       Mar     1       0:00    0       -
  587.         // Rule Para    1997    max     -       Oct     1       0:00    1:00    S
  588.         // America/Asuncion     Paraguay        -4:00   Para    PY%sT
  589.         //----------------------------------------------------------
  590.         new SimpleTimeZone((int)(-3.5 * millisPerHour), "America/St_Johns" /*N%sT*/,
  591.                 Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  592.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  593.         // Rule StJohns 1960    max     -       Oct     lastSun 2:00    0       S
  594.         // Rule StJohns 1989    max     -       Apr     Sun>=1  2:00    1:00    D
  595.         // America/St_Johns     Canada  -3:30   StJohns N%sT
  596.         //----------------------------------------------------------
  597.         new SimpleTimeZone(-3 * millisPerHour, "America/Buenos_Aires" /*AR%sT*/),
  598.         // America/Buenos_Aires Argentina       -3:00   -       AR%sT
  599.         // America/Catamarca    Argentina       -3:00   -       ART
  600.         // America/Cayenne      French Guiana   -3:00   -       GFT
  601.         // America/Cordoba      Argentina       -3:00   -       ART
  602.         // America/Fortaleza    Brazil  -3:00   -       EST
  603.         // America/Jujuy        Argentina       -3:00   -       ART
  604.         // America/Mendoza      Argentina       -3:00   -       ART
  605.         // America/Montevideo   Uruguay -3:00   -       UY%sT
  606.         // America/Paramaribo   Suriname        -3:00   -       SRT
  607.         // America/Rosario      Argentina       -3:00   -       ART
  608.         //----------------------------------------------------------
  609.         new SimpleTimeZone(-3 * millisPerHour, "America/Sao_Paulo" /*E%sT*/,
  610.                 Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  611.                 Calendar.FEBRUARY, 11, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  612.         // Rule Brazil  1996    max     -       Feb     Sun>=11 0:00    0       S
  613.         // Rule Brazil  1996    max     -       Oct     Sun>=1  0:00    1:00    D
  614.         // America/Sao_Paulo    Brazil  -3:00   Brazil  E%sT
  615.         // America/Maceio       Brazil  -3:00   Brazil  E%sT
  616.         //----------------------------------------------------------
  617. //        new SimpleTimeZone(-3 * millisPerHour, "America/Miquelon" /*PM%sT*/,
  618. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  619. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  620.         // Rule Mont    1957    max     -       Oct     lastSun 2:00    0       S
  621.         // Rule Mont    1987    max     -       Apr     Sun>=1  2:00    1:00    D
  622.         // America/Miquelon     St Pierre and Miquelon  -3:00   Mont    PM%sT   # Pierre & Miquelon Time
  623.         //----------------------------------------------------------
  624. //        new SimpleTimeZone(-3 * millisPerHour, "America/Godthab" /*WG%sT*/,
  625. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, -2 * millisPerHour,
  626. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, -2 * millisPerHour, 1 * millisPerHour),
  627.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  628.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  629.         // America/Godthab      ?       -3:00   EU      WG%sT
  630.         //----------------------------------------------------------
  631. //        new SimpleTimeZone(-2 * millisPerHour, "Atlantic/South_Georgia" /*GST*/),
  632.         // Atlantic/South_Georgia       South Georgia   -2:00   -       GST     # South Georgia Time
  633.         // America/Noronha      Brazil  -2:00   -       FST
  634.         //----------------------------------------------------------
  635.         new SimpleTimeZone(-1 * millisPerHour, "Atlantic/Cape_Verde" /*CVT*/),
  636.         // Atlantic/Cape_Verde  Cape Verde      -1:00   -       CVT
  637.         // Atlantic/Jan_Mayen   Norway  -1:00   -       EGT
  638.         //----------------------------------------------------------
  639.         new SimpleTimeZone(-1 * millisPerHour, "Atlantic/Azores" /*AZO%sT*/,
  640.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  641.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  642.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  643.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  644.         // Atlantic/Azores      Portugal        -1:00   EU      AZO%sT
  645.         // America/Scoresbysund ?       -1:00   EU      EG%sT
  646.         //----------------------------------------------------------
  647.         new SimpleTimeZone(0 * millisPerHour, "Africa/Casablanca" /*WET*/),
  648.         // Africa/Casablanca    Morocco 0:00    -       WET
  649.         // Africa/Abidjan       Cote D'Ivoire   0:00    -       WAT
  650.         // Africa/Accra Ghana   0:00    -       %s
  651.         // Africa/Bamako        Mali    0:00    -       WAT
  652.         // Africa/Banjul        Gambia  0:00    -       WAT
  653.         // Africa/Bissau        Guinea-Bissau   0:00    -       WAT
  654.         // Africa/Conakry       Guinea  0:00    -       WAT
  655.         // Africa/Dakar Senegal 0:00    -       WAT
  656.         // Africa/El_Aaiun      Morocco 0:00    -       WET
  657.         // Africa/Freetown      Sierra Leone    0:00    -       WA%sT
  658.         // Africa/Lome  Togo    0:00    -       WAT
  659.         // Africa/Monrovia      Liberia 0:00    -       WAT
  660.         // Africa/Nouakchott    Mauritania      0:00    -       WAT
  661.         // Africa/Ouagadougou   Burkina Faso    0:00    -       WAT
  662.         // Africa/Sao_Tome      Sao Tome and Principe   0:00    -       WAT
  663.         // Africa/Timbuktu      Mali    0:00    -       WAT
  664.         // Atlantic/Reykjavik   Iceland 0:00    -       GMT
  665.         // Atlantic/St_Helena   St Helena       0:00    -       GMT
  666.         //----------------------------------------------------------
  667. //        new SimpleTimeZone(0 * millisPerHour, "Europe/London" /*GMT/BST*/,
  668. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour,
  669. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  670.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  671.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  672.         // Europe/London        United Kingdom  0:00    EU      GMT/BST
  673.         // Atlantic/Canary      Spain   0:00    EU      WE%sT
  674.         // Atlantic/Faeroe      Denmark 0:00    EU      WE%sT
  675.         // Atlantic/Madeira     Portugal        0:00    EU      WE%sT
  676.         // Europe/Belfast       United Kingdom  0:00    EU      GMT/BST
  677.         // Europe/Dublin        United Kingdom  0:00    EU      GMT/IST
  678.         // Europe/Lisbon        Portugal        0:00    EU      WE%sT
  679.         // WET  Continental Europe      0:00    EU      WE%sT
  680.         //----------------------------------------------------------
  681. //        new SimpleTimeZone(1 * millisPerHour, "Africa/Lagos" /*CAT*/),
  682.         // Africa/Lagos Nigeria 1:00    -       CAT
  683.         // Africa/Algiers       Algeria 1:00    -       CET
  684.         // Africa/Bangui        Central African Republic        1:00    -       CAT
  685.         // Africa/Brazzaville   Congo   1:00    -       CAT
  686.         // Africa/Douala        Cameroon        1:00    -       CAT
  687.         // Africa/Kinshasa      Zaire   1:00    -       CAT
  688.         // Africa/Libreville    Gabon   1:00    -       CAT
  689.         // Africa/Luanda        Angola  1:00    -       CAT
  690.         // Africa/Malabo        Equatorial Guinea       1:00    -       CAT
  691.         // Africa/Ndjamena      Chad    1:00    -       CAT
  692.         // Africa/Niamey        Niger   1:00    -       CAT
  693.         // Africa/Porto-Novo    Benin   1:00    -       CAT
  694.         // Africa/Tunis Tunisia 1:00    -       CE%sT
  695.         //----------------------------------------------------------
  696.         new SimpleTimeZone(1 * millisPerHour, "Europe/Paris" /*CE%sT*/,
  697.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  698.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  699.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  700.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  701.         // Europe/Paris France  1:00    EU      CE%sT
  702.         // Africa/Ceuta Spain   1:00    EU      CE%sT
  703.         // Europe/Amsterdam     Netherlands     1:00    EU      CE%sT
  704.         // Europe/Andorra       Andorra 1:00    EU      CE%sT
  705.         // Europe/Belgrade      Yugoslavia      1:00    EU      CE%sT
  706.         // Europe/Berlin        Germany 1:00    EU      CE%sT
  707.         // Europe/Brussels      Belgium 1:00    EU      CE%sT
  708.         // Europe/Budapest      Hungary 1:00    EU      CE%sT
  709.         // Europe/Copenhagen    Denmark 1:00    EU      CE%sT
  710.         // Europe/Gibraltar     Gibraltar       1:00    EU      CE%sT
  711.         // Europe/Ljubljana     Slovenia        1:00    EU      CE%sT
  712.         // Europe/Luxembourg    Luxembourg      1:00    EU      CE%sT
  713.         // Europe/Madrid        Spain   1:00    EU      CE%sT
  714.         // Europe/Malta Malta   1:00    EU      CE%sT
  715.         // Europe/Monaco        Monaco  1:00    EU      CE%sT
  716.         // Europe/Oslo  Norway  1:00    EU      CE%sT
  717.         // Europe/Prague        Czech Republic  1:00    EU      CE%sT
  718.         // Europe/Rome  Italy   1:00    EU      CE%sT
  719.         // Europe/Sarajevo      Bosnia and Herzegovina  1:00    EU      CE%sT
  720.         // Europe/Skopje        Macedonia       1:00    EU      CE%sT
  721.         // Europe/Stockholm     Sweden  1:00    EU      CE%sT
  722.         // Europe/Tirane        Albania 1:00    EU      CE%sT
  723.         // Europe/Vaduz Liechtenstein   1:00    EU      CE%sT
  724.         // Europe/Vienna        Austria 1:00    EU      CE%sT
  725.         // Europe/Zagreb        Croatia 1:00    EU      CE%sT
  726.         // Europe/Zurich        Switzerland     1:00    EU      CE%sT
  727.         //----------------------------------------------------------
  728. //        new SimpleTimeZone(1 * millisPerHour, "Africa/Tripoli" /*CE%sT*/,
  729. //                Calendar.MARCH, -1, Calendar.THURSDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  730. //                Calendar.OCTOBER, 1, -Calendar.THURSDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  731.         // Rule Libya   1997    max     -       Mar     lastThu 2:00s   1:00    S
  732.         // Rule Libya   1997    max     -       Oct     Thu>=1  2:00s   0       -
  733.         // Africa/Tripoli       Libya   1:00    Libya   CE%sT
  734.         //----------------------------------------------------------
  735.         // Omitting zone CET
  736.         // Rule C-Eur   1981    max     -       Mar     lastSun 2:00s   1:00    S
  737.         // Rule C-Eur   1996    max     -       Oct     lastSun 2:00s   0       -
  738.         // CET  Continental Europe      1:00    C-Eur   CE%sT
  739.         // MET  Continental Europe      1:00    C-Eur   ME%sT
  740.         //----------------------------------------------------------
  741. //        new SimpleTimeZone(1 * millisPerHour, "Europe/Warsaw" /*CE%sT*/,
  742. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 1 * millisPerHour,
  743. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  744.         // Rule W-Eur   1981    max     -       Mar     lastSun 1:00s   1:00    S
  745.         // Rule W-Eur   1996    max     -       Oct     lastSun 1:00s   0       -
  746.         // Europe/Warsaw        Poland  1:00    W-Eur   CE%sT
  747.         //----------------------------------------------------------
  748. //        new SimpleTimeZone(2 * millisPerHour, "Africa/Johannesburg" /*SA%sT*/),
  749.         // Africa/Johannesburg  South Africa    2:00    -       SA%sT
  750.         // Africa/Blantyre      Malawi  2:00    -       SAT
  751.         // Africa/Bujumbura     Burundi 2:00    -       SAT
  752.         // Africa/Gaborone      Botswana        2:00    -       SAT
  753.         // Africa/Harare        Zimbabwe        2:00    -       SAT
  754.         // Africa/Khartoum      Sudan   2:00    -       EE%sT
  755.         // Africa/Kigali        Rwanda  2:00    -       SAT
  756.         // Africa/Lubumbashi    Zaire   2:00    -       SAT
  757.         // Africa/Lusaka        Zambia  2:00    -       SAT
  758.         // Africa/Maputo        Mozambique      2:00    -       SAT
  759.         // Africa/Maseru        Lesotho 2:00    -       SAT
  760.         // Africa/Mbabane       Swaziland       2:00    -       SAT
  761.         //----------------------------------------------------------
  762. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Bucharest" /*EE%sT*/,
  763. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  764. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  765.         // Rule E-Eur   1981    max     -       Mar     lastSun 0:00    1:00    S
  766.         // Rule E-Eur   1996    max     -       Oct     lastSun 0:00    0       -
  767.         // Europe/Bucharest     Romania 2:00    E-Eur   EE%sT
  768.         // Europe/Chisinau      Moldova 2:00    E-Eur   EE%sT
  769.         // Europe/Sofia Bulgaria        2:00    E-Eur   EE%sT
  770.         //----------------------------------------------------------
  771.         new SimpleTimeZone(2 * millisPerHour, "Europe/Istanbul" /*EE%sT*/,
  772.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour,
  773.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  774.         // Rule EU      1981    max     -       Mar     lastSun 1:00u   1:00    S
  775.         // Rule EU      1996    max     -       Oct     lastSun 1:00u   0       -
  776.         // Europe/Istanbul      Turkey  2:00    EU      EE%sT
  777.         // EET  Continental Europe      2:00    EU      EE%sT
  778.         // Europe/Athens        Greece  2:00    EU      EE%sT
  779.         // Europe/Helsinki      Finland 2:00    EU      EE%sT
  780.         // Europe/Kiev  Ukraine 2:00    EU      EE%sT
  781.         //----------------------------------------------------------
  782.         new SimpleTimeZone(2 * millisPerHour, "Africa/Cairo" /*EE%sT*/,
  783.                 Calendar.APRIL, -1, Calendar.FRIDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  784.                 Calendar.SEPTEMBER, -1, Calendar.FRIDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  785.         // Rule Egypt   1995    max     -       Apr     lastFri 0:00    1:00    S
  786.         // Rule Egypt   1995    max     -       Sep     lastFri 0:00    0       -
  787.         // Africa/Cairo Egypt   2:00    Egypt   EE%sT
  788.         //----------------------------------------------------------
  789. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Amman" /*EE%sT*/,
  790. //                Calendar.APRIL, 1, -Calendar.FRIDAY /*DOW>=DOM*/, 0 * millisPerHour,
  791. //                Calendar.SEPTEMBER, 15, -Calendar.FRIDAY /*DOW>=DOM*/, 1 * millisPerHour, 1 * millisPerHour),
  792.         // Rule    Jordan       1993    max     -       Apr     Fri>=1  0:00    1:00    S
  793.         // Rule    Jordan       1995    max     -       Sep     Fri>=15 0:00s   0       -
  794.         // Asia/Amman   Jordan  2:00    Jordan  EE%sT
  795.         //----------------------------------------------------------
  796. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Riga" /*EE%sT*/,
  797. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  798. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  799.         // Rule Latvia  1992    max     -       Mar     lastSun 2:00s   1:00    S
  800.         // Rule Latvia  1992    max     -       Sep     lastSun 2:00s   0       -
  801.         // Europe/Riga  Latvia  2:00    Latvia  EE%sT
  802.         //----------------------------------------------------------
  803. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Beirut" /*EE%sT*/,
  804. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  805. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  806.         // Rule Lebanon 1993    max     -       Mar     lastSun 0:00    1:00    S
  807.         // Rule Lebanon 1993    max     -       Sep     lastSun 0:00    0       -
  808.         // Asia/Beirut  Lebanon 2:00    Lebanon EE%sT
  809.         // Asia/Nicosia Cyprus  2:00    Cyprus  EE%sT
  810.         //----------------------------------------------------------
  811. //        new SimpleTimeZone(2 * millisPerHour, "Africa/Windhoek" /*SA%sT*/,
  812. //                Calendar.SEPTEMBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  813. //                Calendar.APRIL, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour, 1 * millisPerHour),
  814.         // Rule Namibia 1994    max     -       Sep     Sun>=1  2:00    1:00    S
  815.         // Rule Namibia 1995    max     -       Apr     Sun>=1  2:00    0       -
  816.         // Africa/Windhoek      Namibia 2:00    Namibia SA%sT
  817.         //----------------------------------------------------------
  818. //        new SimpleTimeZone(2 * millisPerHour, "Europe/Minsk" /*EE%sT*/,
  819. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  820. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  821.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  822.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  823.         // Europe/Minsk Belarus 2:00    Russia  EE%sT
  824.         // Europe/Tallinn       Estonia 2:00    C-Eur   EE%sT
  825.         // Europe/Vilnius       Lithuania       2:00    C-Eur   EE%sT
  826.         // Europe/Kaliningrad   Russia  2:00    Russia  EE%sT
  827.         //----------------------------------------------------------
  828. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Damascus" /*EE%sT*/,
  829. //                Calendar.APRIL, 1, 0 /*DOM*/, 0 * millisPerHour,
  830. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  831.         // Rule Syria   1994    max     -       Apr     1       0:00    1:00    S
  832.         // Rule Syria   1994    max     -       Oct     1       0:00    0       -
  833.         // Asia/Damascus        Syria   2:00    Syria   EE%sT
  834.         //----------------------------------------------------------
  835. //        new SimpleTimeZone(2 * millisPerHour, "Asia/Jerusalem" /*I%sT*/,
  836. //                Calendar.MARCH, 15, -Calendar.FRIDAY /*DOW>=DOM*/, 0 * millisPerHour,
  837. //                Calendar.SEPTEMBER, 15, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  838.         // Rule Zion    1999    max     -       Mar     Fri>=15 0:00    1:00    D
  839.         // Rule Zion    1999    max     -       Sep     Sun>=15 0:00    0       S
  840.         // Asia/Jerusalem       Israel  2:00    Zion    I%sT
  841.         // Asia/Gaza    Palestine       2:00    Zion    I%sT
  842.         //----------------------------------------------------------
  843.         new SimpleTimeZone(3 * millisPerHour, "Asia/Riyadh" /*AST*/),
  844.         // Asia/Riyadh  Saudi Arabia    3:00    -       AST
  845.         // Africa/Addis_Ababa   Ethiopia        3:00    -       EAT
  846.         // Africa/Asmera        Eritrea 3:00    -       EAT
  847.         // Africa/Dar_es_Salaam Tanzania        3:00    -       EAT
  848.         // Africa/Djibouti      Djibouti        3:00    -       EAT
  849.         // Africa/Kampala       Uganda  3:00    -       EAT
  850.         // Africa/Mogadishu     Somalia 3:00    -       EAT
  851.         // Africa/Nairobi       Kenya   3:00    -       EAT
  852.         // Asia/Aden    Yemen   3:00    -       AST
  853.         // Asia/Bahrain Bahrain 3:00    -       AST
  854.         // Asia/Kuwait  Kuwait  3:00    -       AST
  855.         // Asia/Qatar   Qatar   3:00    -       AST
  856.         // Indian/Antananarivo  Madagascar      3:00    -       EAT
  857.         // Indian/Comoro        Comoros 3:00    -       EAT
  858.         // Indian/Mayotte       Mayotte 3:00    -       EAT
  859.         //----------------------------------------------------------
  860. //        new SimpleTimeZone(3 * millisPerHour, "Europe/Simferopol" /*MSK/MSD*/,
  861. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour,
  862. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  863.         // Rule Crimea  1996    max     -       Mar     lastSun 0:00u   1:00    -
  864.         // Rule Crimea  1996    max     -       Oct     lastSun 0:00u   0       -
  865.         // Europe/Simferopol    Ukraine 3:00    Crimea  MSK/MSD
  866.         //----------------------------------------------------------
  867. //        new SimpleTimeZone(3 * millisPerHour, "Asia/Baghdad" /*A%sT*/,
  868. //                Calendar.APRIL, 1, 0 /*DOM*/, 3 * millisPerHour,
  869. //                Calendar.OCTOBER, 1, 0 /*DOM*/, 4 * millisPerHour, 1 * millisPerHour),
  870.         // Rule Iraq    1991    max     -       Apr     1       3:00s   1:00    D
  871.         // Rule Iraq    1991    max     -       Oct     1       3:00s   0       D
  872.         // Asia/Baghdad Iraq    3:00    Iraq    A%sT
  873.         //----------------------------------------------------------
  874. //        new SimpleTimeZone(3 * millisPerHour, "Europe/Moscow" /*MSK/MSD*/,
  875. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  876. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  877.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  878.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  879.         // Europe/Moscow        Russia  3:00    Russia  MSK/MSD
  880.         //----------------------------------------------------------
  881.         new SimpleTimeZone((int)(3.5 * millisPerHour), "Asia/Tehran" /*IR%sT*/,
  882.                 Calendar.MARCH, 4, 0 /*DOM*/, 0 * millisPerHour,
  883.                 Calendar.SEPTEMBER, 4, 0 /*DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  884.         // Rule Iran    1997    1999    -       Mar     21      0:00    1:00    S
  885.         // Rule Iran    1997    1999    -       Sep     23      0:00    0       -
  886.         // Asia/Tehran  Iran    3:30    Iran    IR%sT
  887.         //----------------------------------------------------------
  888.         new SimpleTimeZone(4 * millisPerHour, "Asia/Yerevan" /*AM%sT*/),
  889.         // Asia/Yerevan Armenia 4:00    -       AM%sT
  890.         // Asia/Dubai   United Arab Emirates    4:00    -       GST
  891.         // Asia/Muscat  Oman    4:00    -       GST
  892.         // Indian/Mahe  Seychelles      4:00    -       SCT     # Seychelles Time
  893.         // Indian/Mauritius     Mauritius       4:00    -       MUT     # Mauritius Time
  894.         // Indian/Reunion       Reunion 4:00    -       RET     # Reunion Time
  895.         //----------------------------------------------------------
  896. //        new SimpleTimeZone(4 * millisPerHour, "Asia/Aqtau" /*AQT%sT*/,
  897. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  898. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  899.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  900.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  901.         // Asia/Aqtau   Kazakhstan      4:00 E-EurAsia  AQT%sT
  902.         //----------------------------------------------------------
  903. //        new SimpleTimeZone(4 * millisPerHour, "Asia/Baku" /*AZ%sT*/,
  904. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 5 * millisPerHour,
  905. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 5 * millisPerHour, 1 * millisPerHour),
  906.         // Rule EUAsia  1981    max     -       Mar     lastSun 1:00u   1:00    S
  907.         // Rule EUAsia  1996    max     -       Oct     lastSun 1:00u   0       -
  908.         // Asia/Baku    Azerbaijan      4:00    EUAsia  AZ%sT
  909.         //----------------------------------------------------------
  910. //        new SimpleTimeZone(4 * millisPerHour, "Europe/Samara" /*SAM%sT*/,
  911. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  912. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  913.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  914.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  915.         // Europe/Samara        Russia  4:00    Russia  SAM%sT
  916.         //----------------------------------------------------------
  917. //        new SimpleTimeZone((int)(4.5 * millisPerHour), "Asia/Kabul" /*AFT*/),
  918.         // Asia/Kabul   Afghanistan     4:30    -       AFT
  919.         //----------------------------------------------------------
  920.         new SimpleTimeZone(5 * millisPerHour, "Asia/Karachi" /*PKT*/),
  921.         // Asia/Karachi Pakistan        5:00    -       PKT     # Pakistan Time
  922.         // Asia/Ashkhabad       Turkmenistan    5:00    -       TMT     # Turkmenistan Time
  923.         // Asia/Dushanbe        Tajikistan      5:00    -       TJT     # Tajikistan Time
  924.         // Asia/Tashkent        Uzbekistan      5:00    -       UZT     # Uzbekistan Time
  925.         // Asia/Tbilisi Georgia 5:00    -       GET
  926.         // Indian/Chagos        British Indian Ocean Territory  5:00    -       IOT     # BIOT Time
  927.         // Indian/Kerguelen     France - year-round bases       5:00    -       TFT     # ISO code TF Time
  928.         // Indian/Maldives      Maldives        5:00    -       MVT     # Maldives Time
  929.         //----------------------------------------------------------
  930. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Aqtobe" /*AQT%sT*/,
  931. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  932. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  933.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  934.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  935.         // Asia/Aqtobe  Kazakhstan      5:00 E-EurAsia  AQT%sT
  936.         //----------------------------------------------------------
  937. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Bishkek" /*KG%sT*/,
  938. //                Calendar.APRIL, 7, -Calendar.SUNDAY /*DOW>=DOM*/, 0 * millisPerHour,
  939. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  940.         // Rule Kirgiz  1992    max     -       Apr     Sun>=7  0:00    1:00    S
  941.         // Rule Kirgiz  1991    max     -       Sep     lastSun 0:00    0       -
  942.         // Asia/Bishkek Kirgizstan      5:00    Kirgiz  KG%sT   # Kirgizstan Time
  943.         //----------------------------------------------------------
  944. //        new SimpleTimeZone(5 * millisPerHour, "Asia/Yekaterinburg" /*YEK%sT*/,
  945. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  946. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  947.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  948.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  949.         // Asia/Yekaterinburg   Russia  5:00    Russia  YEK%sT  # Yekaterinburg Time
  950.         //----------------------------------------------------------
  951.         new SimpleTimeZone((int)(5.5 * millisPerHour), "Asia/Calcutta" /*IST*/),
  952.         // Asia/Calcutta        India   5:30    -       IST
  953.         //----------------------------------------------------------
  954. //        new SimpleTimeZone((int)(5.75 * millisPerHour), "Asia/Katmandu" /*NPT*/),
  955.         // Asia/Katmandu        Nepal   5:45    -       NPT     # Nepal Time
  956.         //----------------------------------------------------------
  957.         new SimpleTimeZone(6 * millisPerHour, "Asia/Dacca" /*BDT*/),
  958.         // Asia/Dacca   Bangladesh      6:00    -       BDT     # Bangladesh Time
  959.         // Antarctica/Mawson    Australia - territories 6:00    -       MAWT    # Mawson Time
  960.         // Asia/Colombo Sri Lanka       6:00    -       LKT
  961.         // Asia/Thimbu  Bhutan  6:00    -       BTT     # Bhutan Time
  962.         //----------------------------------------------------------
  963. //        new SimpleTimeZone(6 * millisPerHour, "Asia/Alma-Ata" /*ALM%sT*/,
  964. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  965. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  966.         // Rule E-EurAsia       1981    max     -       Mar     lastSun 0:00    1:00    S
  967.         // Rule E-EurAsia       1996    max     -       Oct     lastSun 0:00    0       -
  968.         // Asia/Alma-Ata        Kazakhstan      6:00 E-EurAsia  ALM%sT
  969.         //----------------------------------------------------------
  970. //        new SimpleTimeZone(6 * millisPerHour, "Asia/Novosibirsk" /*NOV%sT*/,
  971. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  972. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  973.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  974.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  975.         // Asia/Novosibirsk     Russia  6:00    Russia  NOV%sT
  976.         // Asia/Omsk    Russia  6:00    Russia  OMS%sT
  977.         //----------------------------------------------------------
  978. //        new SimpleTimeZone((int)(6.5 * millisPerHour), "Asia/Rangoon" /*MMT*/),
  979.         // Asia/Rangoon Burma / Myanmar 6:30    -       MMT     # Myanmar Time
  980.         // Indian/Cocos Cocos   6:30    -       CCT     # Cocos Islands Time
  981.         //----------------------------------------------------------
  982.         new SimpleTimeZone(7 * millisPerHour, "Asia/Bangkok" /*ICT*/),
  983.         // Asia/Bangkok Thailand        7:00    -       ICT
  984.         // Asia/Jakarta Indonesia       7:00    -       JAVT
  985.         // Asia/Phnom_Penh      Cambodia        7:00    -       ICT
  986.         // Asia/Saigon  Vietnam 7:00    -       ICT
  987.         // Asia/Vientiane       Laos    7:00    -       ICT
  988.         // Indian/Christmas     Australian miscellany   7:00    -       CXT     # Christmas Island Time
  989.         //----------------------------------------------------------
  990. //        new SimpleTimeZone(7 * millisPerHour, "Asia/Krasnoyarsk" /*KRA%sT*/,
  991. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  992. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  993.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  994.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  995.         // Asia/Krasnoyarsk     Russia  7:00    Russia  KRA%sT
  996.         //----------------------------------------------------------
  997.         new SimpleTimeZone(8 * millisPerHour, "Asia/Shanghai" /*C%sT*/),
  998.         // Asia/Shanghai        People's Republic of China      8:00    -       C%sT
  999.         // Antarctica/Casey     Australia - territories 8:00    -       WST     # Western (Aus) Standard Time
  1000.         // Asia/Brunei  Brunei  8:00    -       BNT
  1001.         // Asia/Chungking       People's Republic of China      8:00    -       C%sT
  1002.         // Asia/Harbin  People's Republic of China      8:00    -       C%sT
  1003.         // Asia/Hong_Kong       Hong Kong       8:00    -       C%sT
  1004.         // Asia/Ishigaki        Japan   8:00    -       CST
  1005.         // Asia/Kashgar People's Republic of China      8:00    -       C%sT
  1006.         // Asia/Kuala_Lumpur    Malaysia        8:00    -       MYT     # Malaysia Time
  1007.         // Asia/Kuching Malaysia        8:00    -       MYT
  1008.         // Asia/Macao   Macao   8:00    -       C%sT
  1009.         // Asia/Manila  Philippines     8:00    -       PH%sT
  1010.         // Asia/Singapore       Singapore       8:00    -       SGT
  1011.         // Asia/Taipei  Republic of China       8:00    -       C%sT
  1012.         // Asia/Ujung_Pandang   Indonesia       8:00    -       BORT
  1013.         // Asia/Urumqi  People's Republic of China      8:00    -       C%sT
  1014.         // Australia/Perth      Australia       8:00    -       WST
  1015.         //----------------------------------------------------------
  1016. //        new SimpleTimeZone(8 * millisPerHour, "Asia/Ulan_Bator" /*ULA%sT*/,
  1017. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour,
  1018. //                Calendar.SEPTEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 0 * millisPerHour, 1 * millisPerHour),
  1019.         // Rule Mongol  1991    max     -       Mar     lastSun 0:00    1:00    S
  1020.         // Rule Mongol  1997    max     -       Sep     lastSun 0:00    0       -
  1021.         // Asia/Ulan_Bator      Mongolia        8:00    Mongol  ULA%sT
  1022.         //----------------------------------------------------------
  1023. //        new SimpleTimeZone(8 * millisPerHour, "Asia/Irkutsk" /*IRK%sT*/,
  1024. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1025. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1026.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1027.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1028.         // Asia/Irkutsk Russia  8:00    Russia  IRK%sT
  1029.         //----------------------------------------------------------
  1030.         new SimpleTimeZone(9 * millisPerHour, "Asia/Tokyo" /*JST*/),
  1031.         // Asia/Tokyo   Japan   9:00    -       JST
  1032.         // Asia/Jayapura        Indonesia       9:00    -       JAYT
  1033.         // Asia/Pyongyang       Korea   9:00    -       KST
  1034.         // Asia/Seoul   Korea   9:00    -       K%sT
  1035.         // Pacific/Palau        Palau   9:00    -       PWT     # Palau Time
  1036.         //----------------------------------------------------------
  1037. //        new SimpleTimeZone(9 * millisPerHour, "Asia/Yakutsk" /*YAK%sT*/,
  1038. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1039. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1040.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1041.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1042.         // Asia/Yakutsk Russia  9:00    Russia  YAK%sT
  1043.         //----------------------------------------------------------
  1044.         new SimpleTimeZone((int)(9.5 * millisPerHour), "Australia/Darwin" /*CST*/),
  1045.         // Australia/Darwin     Australia       9:30    -       CST
  1046.         //----------------------------------------------------------
  1047.         new SimpleTimeZone((int)(9.5 * millisPerHour), "Australia/Adelaide" /*CST*/,
  1048.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1049.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1050.         // Rule AS      1987    max     -       Oct     lastSun 2:00s   1:00    -
  1051.         // Rule AS      1995    max     -       Mar     lastSun 2:00s   0       -
  1052.         // Australia/Adelaide   South Australia 9:30    AS      CST
  1053.         // Australia/Broken_Hill        New South Wales 9:30    AN      CST
  1054.         //----------------------------------------------------------
  1055. //        new SimpleTimeZone(10 * millisPerHour, "Australia/Brisbane" /*EST*/),
  1056.         // Australia/Brisbane   Australia       10:00   -       EST
  1057.         // Antarctica/DumontDUrville    France - year-round bases       10:00   -       DDUT    # Dumont-d'Urville Time
  1058.         // Australia/Lindeman   Australia       10:00   -       EST
  1059.         // Pacific/Guam Guam    10:00   -       GST
  1060.         // Pacific/Port_Moresby Papua New Guinea        10:00   -       PGT     # Papua New Guinea Time
  1061.         // Pacific/Saipan       N Mariana Is    10:00   -       MPT
  1062.         // Pacific/Truk Micronesia      10:00   -       TRUT    # Truk Time
  1063.         // Pacific/Yap  Micronesia      10:00   -       YAPT
  1064.         //----------------------------------------------------------
  1065.         new SimpleTimeZone(10 * millisPerHour, "Australia/Sydney" /*EST*/,
  1066.                 Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1067.                 Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1068.         // Rule AN      1987    max     -       Oct     lastSun 2:00s   1:00    -
  1069.         // Rule AN      1996    max     -       Mar     lastSun 2:00s   0       -
  1070.         // Australia/Sydney     New South Wales 10:00   AN      EST
  1071.         // Australia/Melbourne  Victoria        10:00   AV      EST
  1072.         //----------------------------------------------------------
  1073. //        new SimpleTimeZone(10 * millisPerHour, "Australia/Hobart" /*EST*/,
  1074. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  1075. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1076.         // Rule AT      1991    max     -       Oct     Sun>=1  2:00s   1:00    -
  1077.         // Rule AT      1991    max     -       Mar     lastSun 2:00s   0       -
  1078.         // Australia/Hobart     Tasmania        10:00   AT      EST
  1079.         //----------------------------------------------------------
  1080. //        new SimpleTimeZone(10 * millisPerHour, "Asia/Vladivostok" /*VLA%sT*/,
  1081. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1082. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1083.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1084.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1085.         // Asia/Vladivostok     Russia  10:00   Russia  VLA%sT
  1086.         //----------------------------------------------------------
  1087. //        new SimpleTimeZone((int)(10.5 * millisPerHour), "Australia/Lord_Howe" /*LHST*/,
  1088. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1089. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, (int)(0.5 * millisPerHour)),
  1090.         // Rule LH      1987    max     -       Oct     lastSun 2:00s   0:30    -
  1091.         // Rule LH      1996    max     -       Mar     lastSun 2:00s   0       -
  1092.         // Australia/Lord_Howe  Lord Howe Island        10:30   LH      LHST
  1093.         //----------------------------------------------------------
  1094.         new SimpleTimeZone(11 * millisPerHour, "Pacific/Guadalcanal" /*SBT*/),
  1095.         // Pacific/Guadalcanal  Solomon Is      11:00   -       SBT     # Solomon Is Time
  1096.         // Pacific/Efate        Vanuatu 11:00   -       VU%sT   # Vanuatu Time
  1097.         // Pacific/Ponape       Micronesia      11:00   -       PONT    # Ponape Time
  1098.         //----------------------------------------------------------
  1099. //        new SimpleTimeZone(11 * millisPerHour, "Pacific/Noumea" /*NC%sT*/,
  1100. //                Calendar.NOVEMBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1101. //                Calendar.MARCH, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1102.         // Rule NC      1997    max     -       Mar     Sun>=1  2:00s   0       -
  1103.         // Rule NC      1997    max     -       Nov     lastSun 2:00s   1:00    S
  1104.         // Pacific/Noumea       New Caledonia   11:00   NC      NC%sT
  1105.         //----------------------------------------------------------
  1106. //        new SimpleTimeZone(11 * millisPerHour, "Asia/Magadan" /*MAG%sT*/,
  1107. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1108. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1109.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1110.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1111.         // Asia/Magadan Russia  11:00   Russia  MAG%sT
  1112.         //----------------------------------------------------------
  1113. //        new SimpleTimeZone((int)(11.5 * millisPerHour), "Pacific/Norfolk" /*NFT*/),
  1114.         // Pacific/Norfolk      Norfolk 11:30   -       NFT     # Norfolk Time
  1115.         //----------------------------------------------------------
  1116.         new SimpleTimeZone(12 * millisPerHour, "Pacific/Fiji" /*FJT*/),
  1117.         // Pacific/Fiji Fiji    12:00   -       FJT     # Fiji Time
  1118.         // Pacific/Funafuti     Tuvalu  12:00   -       TVT     # Tuvalu Time
  1119.         // Pacific/Kosrae       Micronesia      12:00   -       KOST    # Kosrae Time
  1120.         // Pacific/Kwajalein    Marshall Is     12:00   -       MHT
  1121.         // Pacific/Majuro       Marshall Is     12:00   -       MHT
  1122.         // Pacific/Nauru        Nauru   12:00   -       NRT
  1123.         // Pacific/Tarawa       Kiribati        12:00   -       GILT    # Gilbert Is Time
  1124.         // Pacific/Wake Wake    12:00   -       WAKT    # Wake Time
  1125.         // Pacific/Wallis       Wallis and Futuna       12:00   -       WFT     # Wallis & Futuna Time
  1126.         //----------------------------------------------------------
  1127.         new SimpleTimeZone(12 * millisPerHour, "Pacific/Auckland" /*NZ%sT*/,
  1128.                 Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, 2 * millisPerHour,
  1129.                 Calendar.MARCH, 15, -Calendar.SUNDAY /*DOW>=DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1130.         // Rule NZ      1990    max     -       Oct     Sun>=1  2:00s   1:00    D
  1131.         // Rule NZ      1990    max     -       Mar     Sun>=15 2:00s   0       S
  1132.         // Pacific/Auckland     New Zealand     12:00   NZ      NZ%sT
  1133.         // Antarctica/McMurdo   USA - year-round bases  12:00   NZAQ    NZ%sT
  1134.         //----------------------------------------------------------
  1135. //        new SimpleTimeZone(12 * millisPerHour, "Asia/Kamchatka" /*PET%sT*/,
  1136. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1137. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1138.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1139.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1140.         // Asia/Kamchatka       Russia  12:00   Russia  PET%sT
  1141.         //----------------------------------------------------------
  1142. //        new SimpleTimeZone((int)(12.75 * millisPerHour), "Pacific/Chatham" /*CHA%sT*/,
  1143. //                Calendar.OCTOBER, 1, -Calendar.SUNDAY /*DOW>=DOM*/, (int)(2.75 * millisPerHour),
  1144. //                Calendar.MARCH, 15, -Calendar.SUNDAY /*DOW>=DOM*/, (int)(3.75 * millisPerHour), 1 * millisPerHour),
  1145.         // Rule Chatham 1990    max     -       Oct     Sun>=1  2:45s   1:00    D
  1146.         // Rule Chatham 1991    max     -       Mar     Sun>=15 2:45s   0       S
  1147.         // Pacific/Chatham      New Zealand     12:45   Chatham CHA%sT
  1148.         //----------------------------------------------------------
  1149. //        new SimpleTimeZone(13 * millisPerHour, "Pacific/Tongatapu" /*TOT*/),
  1150.         // Pacific/Tongatapu    Tonga   13:00   -       TOT
  1151.         // Pacific/Enderbury    Kiribati        13:00   -       PHOT
  1152.         //----------------------------------------------------------
  1153. //        new SimpleTimeZone(13 * millisPerHour, "Asia/Anadyr" /*ANA%sT*/,
  1154. //                Calendar.MARCH, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 2 * millisPerHour,
  1155. //                Calendar.OCTOBER, -1, Calendar.SUNDAY /*DOW_IN_DOM*/, 3 * millisPerHour, 1 * millisPerHour),
  1156.         // Rule Russia  1993    max     -       Mar     lastSun 2:00s   1:00    S
  1157.         // Rule Russia  1996    max     -       Oct     lastSun 2:00s   0       -
  1158.         // Asia/Anadyr  Russia  13:00   Russia  ANA%sT
  1159.         //----------------------------------------------------------
  1160. //        new SimpleTimeZone(14 * millisPerHour, "Pacific/Kiritimati" /*LINT*/),
  1161.         // Pacific/Kiritimati   Kiribati        14:00   -       LINT
  1162.         //----------------------------------------------------------
  1163.         // 347 total zones
  1164.         // 120 zones not including identical offset/rule zones
  1165.         // 96 zones not including equivalent offset/rule zones
  1166.     };
  1167.  
  1168.     /**
  1169.      * This array maps between the old three-letter IDs we used to use
  1170.      * and the current names of those zones.  We use this array during
  1171.      * initialization to provide backwards compatibility.
  1172.      *
  1173.      * Note in particular that these three-letter IDs are completely
  1174.      * wrong in some cases, and do not represent the correct abbreviations
  1175.      * in common use.  For example, "AST" is not the correct abbreviation for
  1176.      * Alaskan Standard Time; it is "AKST".  These IDs are for compatibilty
  1177.      * only, and their use is in fact deprecated.
  1178.      */
  1179.     private static final String[] compatibilityMap =
  1180.     {
  1181.         // GMT is the ID for Greenwich Mean Time time zone.
  1182.         /*GMT+0*/ "GMT", "Africa/Casablanca", // NOT Europe/London
  1183.                   "UTC", "Africa/Casablanca",
  1184.         // ECT is the ID for European Central Time time zone.
  1185.         /*GMT+1*/ "ECT", "Europe/Paris",
  1186.         // EET is the ID for Eastern European Time time zone.
  1187.         /*GMT+2*/ "EET", "Europe/Istanbul",
  1188.         // ART is the ID for (Arabic) Egypt Standard Time timezone.
  1189.         /*GMT+2*/ "ART", "Africa/Cairo",
  1190.         // EAT is the ID for Eastern African Time time zone.
  1191.         /*GMT+3*/ "EAT", "Asia/Riyadh",
  1192.         // MET is the ID for Middle East Time time zone.
  1193.         /*GMT+0330*/ "MET", "Asia/Tehran",
  1194.         // NET is the ID for Near East Time time zone.
  1195.         /*GMT+4*/ "NET", "Asia/Yerevan",
  1196.         // PLT is the ID for Pakistan Lahore Time time zone.
  1197.         /*GMT+5*/ "PLT", "Asia/Karachi",
  1198.         // IST is the ID for India Standard Time time zone.
  1199.         /*GMT+0550*/ "IST", "Asia/Calcutta",
  1200.         // BST is the ID for Bangladesh Standard Time time zone.
  1201.         /*GMT+6*/ "BST", "Asia/Dacca",
  1202.         // VST is the ID for Vietnam Standard Time time zone.
  1203.         /*GMT+7*/ "VST", "Asia/Bangkok",
  1204.         // CTT is the ID for China Taiwan Time time zone.
  1205.         /*GMT+8*/ "CTT", "Asia/Shanghai",
  1206.         // JST is the ID for Japan Standard Time time zone.
  1207.         /*GMT+9*/ "JST", "Asia/Tokyo",
  1208.         // ACT is the ID for Australia Central Time time zone.
  1209.         /*GMT+0930*/ "ACT", "Australia/Darwin",
  1210.         // AET is the ID for Australia Eastern Time time zone.
  1211.         /*GMT+10*/ "AET", "Australia/Sydney",
  1212.         // SST is the ID for Solomon Standard Time time zone.
  1213.         /*GMT+11*/ "SST", "Pacific/Guadalcanal",
  1214.         // NST is the ID for New Zealand Standard Time time zone.
  1215.         /*GMT+12*/ "NST", "Pacific/Fiji",
  1216.         // MIT is the ID for Midway Islands Time time zone.
  1217.         /*GMT-11*/ "MIT", "Pacific/Apia",
  1218.         // HST is the ID for Hawaii Standard Time time zone.
  1219.         /*GMT-10*/ "HST", "Pacific/Honolulu",
  1220.         // AST is the ID for Alaska Standard Time time zone.
  1221.         /*GMT-9*/ "AST", "America/Anchorage",
  1222.         // PST is the ID for Pacific Standard Time time zone.
  1223.         /*GMT-8*/ "PST", "America/Los_Angeles",
  1224.         // PNT is the ID for Phoenix Standard Time time zone.
  1225.         /*GMT-7*/ "PNT", "America/Phoenix",
  1226.         // MST is the ID for Mountain Standard Time time zone.
  1227.         /*GMT-7*/ "MST", "America/Denver",
  1228.         // CST is the ID for Central Standard Time time zone.
  1229.         /*GMT-6*/ "CST", "America/Chicago",
  1230.         // EST is the ID for Eastern Standard Time time zone.
  1231.         /*GMT-5*/ "EST", "America/New_York",
  1232.         // IET is the ID for Indiana Eastern Standard Time time zone.
  1233.         /*GMT-5*/ "IET", "America/Indianapolis",
  1234.         // PRT is the ID for Puerto Rico and US Virgin Islands Time time zone.
  1235.         /*GMT-4*/ "PRT", "America/Caracas",
  1236.         // CNT is the ID for Canada Newfoundland Time time zone.
  1237.         /*GMT-0330*/ "CNT", "America/St_Johns",
  1238.         // AGT is the ID for Argentina Standard Time time zone.
  1239.         /*GMT-3*/ "AGT", "America/Buenos_Aires",
  1240.         // BET is the ID for Brazil Eastern Time time zone.
  1241.         /*GMT-3*/ "BET", "America/Sao_Paulo",
  1242.         // CAT is the ID for Central African Time time zone.
  1243.         /*GMT-1*/ "CAT", "Atlantic/Cape_Verde",
  1244.     };
  1245.  
  1246.     private static Hashtable lookup = new Hashtable(zones.length);
  1247.  
  1248.     static {
  1249.         for (int i = 0; i < zones.length; ++i)
  1250.             lookup.put(zones[i].getID(), zones[i]);
  1251.  
  1252.         // We must create a new array with the cloned zones
  1253.         SimpleTimeZone[] newZones =
  1254.             new SimpleTimeZone[zones.length + (compatibilityMap.length / 2)];
  1255.         System.arraycopy(zones, 0, newZones, 0, zones.length);
  1256.  
  1257.         for (int i=0; i<compatibilityMap.length; i+=2)
  1258.         {
  1259.             // Make the map recognize the three-letter abbreviations as keys
  1260.             if (false)
  1261.             {
  1262.                 // Debugging code
  1263.                 if (lookup.get(compatibilityMap[i+1]) == null)
  1264.                     throw new InternalError("Bad TimeZone.idMap at " + i);
  1265.                 if (lookup.get(compatibilityMap[i]) != null)
  1266.                     throw new InternalError("Duplicate compatibilityMap " + compatibilityMap[i]);
  1267.             }
  1268.  
  1269.             // Implement the three-letter zone names in addition to the
  1270.             // long zone names.
  1271.             SimpleTimeZone zone =
  1272.                 (SimpleTimeZone) ((TimeZone) lookup.get(compatibilityMap[i+1])).clone();
  1273.             zone.setID(compatibilityMap[i]);
  1274.             newZones[zones.length + (i / 2)] = zone;
  1275.             lookup.put(compatibilityMap[i], zone);
  1276.         }
  1277.  
  1278.         zones = newZones;
  1279.  
  1280.         // Determine the MAXIMUM_ZONES_PER_OFFSET.  To use this to recompute the
  1281.         // maximum zones per offset, first set MAXIMUM_ZONES_PER_OFFSET to a
  1282.         // large value (like 100).  Then recompile.  Then set the boolean in the
  1283.         // if condition below to true.  Recompile again.  Now run any program
  1284.         // which will trigger this static initialization block.  Note the output
  1285.         // value.  Change MAXIMUM_ZONES_PER_OFFSET to the displayed value,
  1286.         // change the if condition back to false, and recompile again.
  1287.         if (false) {
  1288.             int max = 0;
  1289.             for (int i=-12; i<=12; ++i) {
  1290.                 int n = TimeZone.getAvailableIDs(i * 60*60*1000).length;
  1291.                 if (n > max) max = n;
  1292.             }
  1293.             System.out.println("    private static final int MAXIMUM_ZONES_PER_OFFSET = " +
  1294.                                max + ";");
  1295.         }
  1296.     }
  1297.  
  1298.     /**
  1299.      * Map a long ID to a short ID, if possible.  This method is used for
  1300.      * backward compatibility.
  1301.      * @param id the TimeZone long id.
  1302.      * @result the corresponding short ID, or the same ID if no short ID is found.
  1303.      */
  1304.     final static String mapLongIDtoShortID(String id) {
  1305.         for (int i=1; i<compatibilityMap.length; i+=2) {
  1306.             if (id.equals(compatibilityMap[i]))
  1307.                 return compatibilityMap[i-1];
  1308.         }
  1309.         return id;
  1310.     }
  1311. }
  1312.  
  1313. //eof
  1314.